# coding=utf-8
import requests
import json
import sys

# query_string = sys.argv[1]

headers = {
    "User-Agent": "Mozilla/5.0 (Linux; Android 5.1.1; Nexus 6 Build/LYZ28E) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Mobile Safari/537.36",
    "Content-Type": "application/x-www-form-urlencoded"
}

post_data = {
    "phone": "13113777555",
    "pwd" : "1234567890"
}

post_url = "https://api.xdclass.net/pub/api/v1/web/web_login"

r = requests.post(post_url, data=post_data, headers=headers)
# print(r.content.decode())
dict_ret = json.loads(r.content.decode())
# ret = dict_ret["trans"][0]["dst"]
print("result is :", dict_ret)
